export default function virtualModule() {
  return {
    name: 'virtual-module', // 此名称将出现在警告和错误中
    version: '1.0.0',
    resolveId(source) {
      if (source === 'virtual-module') {
        return source;
      }
      return null;
    },
    load(id) {
      if (id === 'virtual-module') {
        let pluginInfo = {
          name: 'virtual-module',
          version: '1.0.0',
        }
        let str = JSON.stringify(pluginInfo)
        return `export default ${str}`
      }
      return null;
    }

  };
}